package com.weather.modules.controller;

import com.weather.common.vo.WeatherResponse;
import com.weather.modules.service.CityDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户城市天气信息提供者")
@RestController
@RequestMapping("/citiesweather")
public class CityDataController {

    @Autowired
    private CityDataService cityDataService;

    @ApiOperation(value = "根据城市id获取对应天气情况")
    @RequestMapping(path = "/getCity",method = RequestMethod.GET)
    public WeatherResponse getCity(String cityId) {
        return this.cityDataService.getCity(cityId);
    }
}
